/**
 * 获取错误信息
 * @param {*} message 错误信息
 * @returns 返回一个信息
 */
exports.errorMessage = message => {
  switch(message) {
    case 'UnauthorizedError': 
      return 'PERMISSION_DENIED'
    case 'ReferenceError':
      return 'PERMISSION_DENIED'
    case 'jwt expired':
      return 'UNAUTHENTICATED'
    case 'No authorization token was found':
      return 'PERMISSION_DENIED'

    default: return message
  }
}

// Token Key
exports.secretKey = 'H0bvj4BoFfbWk8hQ'